#include "sys_task.h"
#include "ice_cream_process.h"
#include "ac_check.h"
#include "ntc_temp.h"
#include "msh.h"
#include "modbus_app.h"
#include "control_modes.h"
#include "sys_work.h"

TaskTypeDef task_list[] = {
    TASK_DEF(sys_work, work_system_init, work_process_all, 2)
    TASK_DEF(MSH, msh_task_init, msh_process, 2)
    TASK_DEF(ice_cream_process, ice_cream_process_init, ice_cream_process_handler, 10)
    TASK_DEF(ac_sampler, ac_init, ac_process, 500)
    TASK_DEF(ntc_temp, ntc_temp_poll_init, ntc_temp_poll_process, 500)
    TASK_DEF(modbus_uart3, modbus_uart3_init, modbus_uart3_process, 10)
    TASK_DEF(running_mode, running_mode_init, running_mode_process, 10)
   

};

void task_list_init(void)
{
        _task_start=task_list;
        _task_end=_task_start+sizeof(task_list)/sizeof(task_list[0]);
}


void tick_handler(int system_ticks)
{
    axis_1ms_tick();
    ac_sampler();
}